const mysql = require('mysql');
exports.query = (sql, callback) => {
    let connection = mysql.createConnection({
        host: 'localhost',
        user: 'root',
        password: '',
        database:'test'
    });
    connection.query(sql, (...args)=>{
        callback.apply(null, args);
        connection.end();
    });
};